package cn.edu.qlnu.xky.test.common;

import java.util.List;

public class Page<T> {

	private int pageNo;//1 当前的页号，从1开始
	private int totalCount;//2 总的记录数
	private int pageSize = 5;
	
	private List<T> records;//3
	
	public int getPageMax() {//获取总页数
		if(totalCount==0)
			return 0;
		int max = totalCount/pageSize;
		if(totalCount % pageSize !=0) {
			max ++;
		}
		return max;
	}

	public int getPageNo() {
		return pageNo;
	}

	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
	}

	public int getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public List<T> getRecords() {
		return records;
	}

	public void setRecords(List<T> records) {
		this.records = records;
	}
	
	
	
}
